|
||||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectfhg2a.ReLogoTurtle
Tribe
abstract class Tribe extends ReLogoTurtle
Abstract turtle forming the basis for all tribes (agents). All tribes reproduce and cull according to the same rules and these methods are therefore defined here. Foraging and movement algorithms must be implemented by each extending class.
Property Summary | |
---|---|
java.lang.Object |
births
|
java.lang.Object |
deaths
|
java.lang.Object |
migrations
|
java.lang.Object |
populationSize
|
Method Summary | |
---|---|
java.lang.Object
|
agentOnDesert()
Determine the number of agents on patch (if patch is desert). |
java.lang.Object
|
agentOnLush()
Determine the number of agents on patch (if patch is lush). |
java.lang.Object
|
agentOnMiddle()
Determine the number of agents on patch (if patch is middle habitat). |
java.lang.Object
|
birthsOnDesert()
Determine the number of births on patch (if patch is desert). |
java.lang.Object
|
birthsOnLush()
Determine the number of births on patch (if patch is lush). |
java.lang.Object
|
birthsOnMiddle()
Determine the number of births on patch (if patch is middle habitat). |
java.lang.Object
|
cull(java.lang.Object availableEnergy)
Cull population to maximum size that can be sustained by energy gathered. |
java.lang.Object
|
deathsOnDesert()
Determine the number of deaths on patch (if patch is desert). |
java.lang.Object
|
deathsOnLush()
Determine the number of deaths on patch (if patch is lush). |
java.lang.Object
|
deathsOnMiddle()
Determine the number of deaths on patch (if patch is middle habitat). |
java.lang.Object
|
forage()
All extending classes must implement a foraging algorithm. |
java.lang.Object
|
migrationsToDesert()
Determine the number of migrations by this agent (if patch is desert). |
java.lang.Object
|
migrationsToLush()
Determine the number of migrations by this agent (if patch is lush). |
java.lang.Object
|
migrationsToMiddle()
Determine the number of migrations by this agent (if patch is middle habitat). |
java.lang.Object
|
move()
All extending classes must implement an algorithm for deciding whether or not to move, and to which patch. |
java.lang.Object
|
reproduce(java.lang.Object tribeType)
Increase population of tribe. |
java.lang.Object
|
reset()
Sets a tribe's population back to the default (20 individuals). |
java.lang.Object
|
step(java.lang.Object tribeType)
Execute tribe's yearly cycle of activity in a fixed order: reproduce, decide whether to move to a new patch, forage for food. |
Property Detail |
---|
java.lang.Object births
java.lang.Object deaths
java.lang.Object migrations
java.lang.Object populationSize
Method Detail |
---|
java.lang.Object agentOnDesert()
java.lang.Object agentOnLush()
java.lang.Object agentOnMiddle()
java.lang.Object birthsOnDesert()
java.lang.Object birthsOnLush()
java.lang.Object birthsOnMiddle()
java.lang.Object cull(java.lang.Object availableEnergy)
availableEnergy
- Amount of energy available to support the tribe population.
java.lang.Object deathsOnDesert()
java.lang.Object deathsOnLush()
java.lang.Object deathsOnMiddle()
java.lang.Object forage()
java.lang.Object migrationsToDesert()
java.lang.Object migrationsToLush()
java.lang.Object migrationsToMiddle()
java.lang.Object move()
java.lang.Object reproduce(java.lang.Object tribeType)
tribeType
- Type of daughter tribes to generate (if any).
java.lang.Object reset()
java.lang.Object step(java.lang.Object tribeType)
tribeType
- Type of daughter tribes to generate when reproducing (if any).